<? require_once('admin/dbconnect.php'); ?>
<?php require_once('admin/conf.php'); ?>
<html>
<head><title>Open Video</title>
</head>
<style>
a
{
color:#0000ff;
}

a:hover
{
color:#ff0000;
}
</style>
<body bgcolor='#dddfff' text='#0000ff'>
<center>
<font color='#0000ff' size="1">
Youtube Video Server &nbsp; (Created by <a href='http://www.googlewala.com' target='_blank'>
<font color='#0000ff'>www.googlewala.com
</font>
</a>)
<br><br>
<?
$id=$_GET['id'];
if(ctype_digit($id)){
include "config.php";

$query=" SELECT * FROM videos WHERE id='$id' ";
$result = mysql_query($query) or die ("Error ".mysql_error());
$row=mysql_fetch_array($result);

$id=$row['id'];
$videoname=$row['videoname'];
$videocode=$row['videocode'];
$counter=$row['counter'];

$counter++;
$query=" UPDATE videos SET counter='$counter' WHERE id='$id'";
$result=mysql_query($query);

print $videocode;
echo "<br>";
echo "$videoname - <font color=\"#ff0000\" size=\"2\">$counter</font> Views";

}else{
         print "Invalid id";
         die();
       }
?>
&nbsp; &nbsp; <a href="javascript:window.close()">Close Window</font></a>
</center>
</body>
</html>
